#include <stdio.h>
struct Circle
{
    double (*cal_area)(double);
};

double func1(double r)
{
    return 3.14 * r * r;
}

int main(void)
{
    double area;
    struct Circle *pc;

    pc = (struct Circle*)malloc(sizeof(struct Circle));
    pc->cal_area = func1;
    area = pc->cal_area(10);
    printf("area = %6.2f\n", area);

    getchar();
    return 0;
}
